<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.org/ui"
                template="./../WEB-INF/template/general.xhtml">
    <ui:define name="content">

        <h:form id="soliform">
            
            <p:dataTable id="solidataTable" rendered="#{!customerRersBean.detail}" paginator="true" 
                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"  
                         rowsPerPageTemplate="5,10,15,20,50,100" value="#{customerRersBean.solicitudList}" 
                         var="solicitudReg" liveScroll="true" scrollable="true" rows="20" liveResize="true" 
                         draggableColumns="true" >

                <p:column id="requcodiColumn" filterBy="requcodi"   
                          filterMatchMode="contains"
                          headerText="Prinx">
                    <h:outputText value="#{solicitudReg.requcodi}" />

                    <p:contextMenu>
                        <p:menuitem value="Save" actionListener="#{customerRersBean.printRequest(solicitudReg.requcodi)}"
                                    icon="ui-icon-disk"/>
                        <p:menuitem value="Update"
                                    icon="ui-icon-arrowrefresh-1-w"/>
                        <p:menuitem value="Delete" icon="ui-icon-close"/>
                        <p:menuitem value="Homepage" url="http://www.primefaces.org"
                                    icon="ui-icon-extlink"/>
                    </p:contextMenu>

                </p:column>
                <p:column headerText="Cliente"
                          id="tercdescColumn" filterBy="tercdesc"   
                          filterMatchMode="contains">
                    <h:outputText value="#{solicitudReg.tercdesc}" />
                </p:column>
                <p:column headerText="Proyecto" rendered="false" >
                    <h:outputText value="#{solicitudReg.proydesc}" />
                </p:column>
                <p:column id="requfesiColumn" filterBy="requfesi" 
                          filterMatchMode="contains" headerText="Ingreso">
                    <h:outputText value="#{solicitudReg.requfesi}" />
                </p:column>
                <p:column id="requfecoColumn" filterBy="requfeco" 
                          filterMatchMode="contains" headerText="Compromiso">
                    <h:outputText value="#{solicitudReg.requfeco}" />
                </p:column>
                <p:column headerText="Producto">
                    <h:outputText value="#{solicitudReg.proddesc}" />
                </p:column>
                <p:column headerText="Clase RQ" rendered="false" >
                    <h:outputText value="#{solicitudReg.clredesc}" />
                </p:column>
                <p:column headerText="Tipo RQ" rendered="false" >
                    <h:outputText value="#{solicitudReg.tiredesc}" />
                </p:column>
                <p:column headerText="Descripcion" width="300" >
                    <h:outputText value="#{solicitudReg.requdeta}" />
                </p:column>
                <!--
                <p:column headerText="Eval. Exp 1" width="150" >
                    <h:inputTextarea></h:inputTextarea>
                </p:column>
                <p:column headerText="Eval. Exp 2" width="150" >
                    <h:inputTextarea></h:inputTextarea>
                </p:column>
                <p:column headerText="Eval. Exp 3" width="150" >
                    <h:inputTextarea></h:inputTextarea>
                </p:column>
                -->
            </p:dataTable>
            <!--</h:form>
            <h:form id="dataexporterform">-->
            <h:panelGrid columns="2">  
                <p:panel header="Exportar Todo">  
                    <h:commandLink>  
                        <p:graphicImage value="./../resources/img/excel.png" /> 
                        <p:dataExporter type="xls" target="solidataTable" fileName="compAgend" />  
                    </h:commandLink>  

                    <h:commandLink>  
                        <p:graphicImage value="./../resources/img/pdf.png" />
                        <p:dataExporter type="pdf" target="solidataTable" fileName="compAgend"/>  
                    </h:commandLink>  

                    <h:commandLink>  
                        <p:graphicImage value="./../resources/img/csv.png" />
                        <p:dataExporter type="csv" target="solidataTable" fileName="compAgend" />  
                    </h:commandLink>  

                    <h:commandLink>  
                        <p:graphicImage value="./../resources/img/xml.png" />
                        <p:dataExporter type="xml" target="solidataTable" fileName="compAgend" />  
                    </h:commandLink>  
                </p:panel>  

                <p:panel header="Exportar Pagina">  
                    <h:commandLink>  
                        <p:graphicImage value="./../resources/img/excel.png" />
                        <p:dataExporter type="xls" target="solidataTable" fileName="compAgend" pageOnly="true"/>  
                    </h:commandLink>  

                    <h:commandLink>  
                        <p:graphicImage value="./../resources/img/pdf.png" />
                        <p:dataExporter type="pdf" target="solidataTable" fileName="compAgend" pageOnly="true" />  
                    </h:commandLink>  

                    <h:commandLink>  
                        <p:graphicImage value="./../resources/img/csv.png" />
                        <p:dataExporter type="csv" target="solidataTable" fileName="compAgend" pageOnly="true"/>  
                    </h:commandLink>  

                    <h:commandLink>  
                        <p:graphicImage value="./../resources/img/xml.png" />
                        <p:dataExporter type="xml" target="solidataTable" fileName="compAgend" pageOnly="true"/>  
                    </h:commandLink>  
                </p:panel>  
            </h:panelGrid> 
        </h:form>
    </ui:define>
</ui:composition>
